﻿@model List<KeyValuePair<string, List<Pr0ject0.ViewModel.JobViewModel>>>

@{
    ViewBag.Title = "Index";
}

@using (@Html.BeginForm("Index", "JobApplication", FormMethod.Get))
{
    <h2>Search</h2> 

    <p>Job Title
    @Html.DropDownList("jobTitle" , new SelectList(ViewBag.titles, "Key", "Value")) </p>
    <br />
    <p>Department
    @Html.DropDownList("department", new SelectList(ViewBag.dept))</p>
    <br />
    <p>Distance(mi)
    @Html.DropDownList("distance" , new SelectList(ViewBag.dist))</p>
    <br />

    <p>Salary
    @Html.TextBox("salary")</p>
    <br />

    <p>
        <input type="submit" value="Search" />
    </p>
}

<h2>Positions Available</h2>

@using (@Html.BeginForm()){
    foreach(KeyValuePair<string, List<Pr0ject0.ViewModel.JobViewModel>> kv in Model)
    {
        <h3>@kv.Key</h3>
        <table>
            @Html.Partial("~\\Views\\Shared\\_PartialJobViewModelList.cshtml", kv.Value)
        </table>
    }
    
    <br />
    <p>
        <input type="submit" value="Submit" />
    </p>

}


